﻿using System;

namespace Sgr.Domain.Uow
{
    /// <summary>
    /// 工作单元事件参数类
    /// </summary>
    public class UnitOfWorkEventArgs : EventArgs
    {
        /// <summary>
        /// 获取工作单元实例
        /// </summary>
        public IUnitOfWork UnitOfWork { get; }

        /// <summary>
        /// 初始化 <see cref="UnitOfWorkEventArgs"/> 类的新实例
        /// </summary>
        /// <param name="unitOfWork">工作单元实例</param>
        public UnitOfWorkEventArgs(IUnitOfWork unitOfWork)
        {
            Check.NotNull(unitOfWork, nameof(unitOfWork));
            UnitOfWork = unitOfWork;
        }
    }
}